package com.zm.exam.springbootexam.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.zm.exam.springbootexam.entry.Question;
import org.apache.ibatis.annotations.Select;

import java.util.List;


/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author zm
 * @since 2024-08-14
 */
public interface QuestionMapper extends BaseMapper<Question> {
    @Select("select * from question where type = #{type} and course = #{course} order by rand() limit #{sum}")
    public List<Question> randSelectByType(String type,String course,int sum);
}
